﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LANmine
{
    public class User
    {
        /**
         * --------------------
         * Private declarations
         * --------------------
         */
        private UInt32 _id; // Should never be modified
        private String _username;
        private String _firstname;
        private String _lastname;
        private bool _paid; // Red error will be shown at the top of the screen if user has not paid.
        private UInt32 _credits; // Cannot be negative, so we use UInt (unsigned int). This value will change during runtime.
        private bool _staff; // Determines whether this user can access staff only functions like the check-in.
        private String _lang;
        private String _email;
        private bool _checkedin; // determines whether this user has checked in or not

        /** Constructor, serves no purpose */
        public User() { }

        /**
         * -----------------
         * Public Properties
         * -----------------
         */
        public UInt32 ID
        {
            set { this._id = value; }
            get { return this._id; }
        }

        public String UserName
        {
            set { this._username = value; }
            get { return this._username; }
        }

        public String FirstName
        {
            set { this._firstname = value; }
            get { return this._firstname; }
        }

        public String LastName
        {
            set { this._lastname = value; }
            get { return this._lastname; }
        }

        public bool Paid
        {
            set { this._paid = value; }
            get { return this._paid; }
        }

        public UInt32 Credits
        {
            set { this._credits = value; }
            get { return this._credits; }
        }

        public bool IsStaff
        {
            set { this._staff = value; }
            get { return this._staff; }
        }

        public String Language
        {
            set { this._lang= value; }
            get { return this._lang; }
        }

        public String Email 
        {
            set { this._email = value; }
            get { return this._email; }
        }

        public bool Checkedin
        {
            set { this._checkedin = value; }
            get { return this._checkedin; }
        }

        public override String ToString()
        {
            return "ID: " + ID + ", UserName: " + UserName + ", Name: " + LastName + ", FirstName: " + FirstName + ", Paid: " + Paid + ", Credits: " + Credits + ", IsStaff: " + IsStaff + ", Language: " + Language;
        }
    }
}